home *** CD-ROM | disk | FTP | other *** search
- DECLARE SUB VerticalMenu (boxstyle%, fc%, bc%, tr%, lc%, row%)
- CLS
- PRINT STRING$(2080, 219)
-
- VerticalMenu 1, 15, 9, 7, 22, 8
- ' │ │ │ │ └──┐└───┐
- ' boxstyle%─┘ fc% bc% └─tr% lc% row%
- ' ──────────────────────────────────────────
- ' Boxstyle:
- ' There are five choices of boxstyles (Press F 3 on the Tools Menu
- ' to see what they look like.)
- ' ──────────────────────────────────────────
- ' Fc%:
- ' Foreground color (Pick any color from 1 to 15)
- ' ──────────────────────────────────────────
- ' Bc%:
- ' Background color (Pick any color from 1 to 15)
- ' ──────────────────────────────────────────
- ' Tr%:
- ' Location of row for first line of box. (Placing longer menus below
- ' rows 12 to 16 will cause them not to properly appear on the screen.)
- ' ──────────────────────────────────────────
- ' Lc%:
- ' Location of first column for first line of box. (Menus are 25 columns
- ' wide, placing them near the edge of the screen at column 66 or greater
- ' will cause distortion.)
- ' ──────────────────────────────────────────
- ' Row%:
- ' Row% places the widebar menu selector on the first item of the menu
- ' (Row% is always one number larger than tr%)
-
- SUB VerticalMenu (boxstyle%, fc%, bc%, tr%, lc%, row%)
- DIM menu$(0 TO 11)
- COLOR fc%, bc%
- SELECT CASE boxstyle%
- CASE 1
- side$ = "│"
- menu$(0) = "┌───────────────────────┐" 'box building elements;
- menu$(11) = "└───────────────────────┘" 'all elements handled
- CASE 2 'by menu$
- side$ = "║"
- menu$(0) = "╔═══════════════════════╗"
- menu$(11) = "╚═══════════════════════╝"
- CASE 3
- side$ = "║"
- menu$(0) = "╓───────────────────────╖"
- menu$(11) = "╙───────────────────────╜"
- CASE 4
- side$ = "│"
- menu$(0) = "╒═══════════════════════╕"
- menu$(11) = "╘═══════════════════════╛"
- CASE 5
- side$ = "█"
- menu$(0) = STRING$(25, 219)
- menu$(11) = STRING$(25, 219)
- END SELECT
- menu$(1) = side$ + " WASHINGTON " + side$ 'MenuMan has already
- menu$(2) = side$ + " LINCOLN " + side$ 'sized each entry to
- menu$(3) = side$ + " JEFFERSON " + side$ 'provide a full length
- menu$(4) = side$ + " ADAMS " + side$ 'widebar selector
- menu$(5) = side$ + " MONROE " + side$
- menu$(6) = side$ + " KENNEDY " + side$
- menu$(7) = side$ + " TRUMAN " + side$
- menu$(8) = side$ + " JOHNSON " + side$
- menu$(9) = side$ + " ROOSEVELT " + side$
- menu$(10) = side$ + " EXIT PROGRAM " + side$
- FOR set = 0 TO 11
- LOCATE set + tr%, lc%: COLOR fc%, bc%: PRINT menu$(set)
- NEXT
- row = row% ' preset for widebar selector
- DO
- DO
- SELECT CASE row
- CASE row%: opt$ = " WASHINGTON "
- CASE row% + 1: opt$ = " LINCOLN " 'sizing also preset for
- CASE row% + 2: opt$ = " JEFFERSON " 'these entries which are
- CASE row% + 3: opt$ = " ADAMS " 'needed to reprint entries
- CASE row% + 4: opt$ = " MONROE " 'after widebar selector moves
- CASE row% + 5: opt$ = " KENNEDY " 'on to next entry
- CASE row% + 6: opt$ = " TRUMAN "
- CASE row% + 7: opt$ = " JOHNSON "
- CASE row% + 8: opt$ = " ROOSEVELT "
- CASE row% + 9: opt$ = " EXIT PROGRAM "
- END SELECT
- LOCATE row, lc% + 1, 0: COLOR bc%, fc%: PRINT opt$
- 'prints first entry with widebar selector
- keys$ = INKEY$
- LOOP WHILE keys$ = ""
- keymove = ASC(RIGHT$(keys$, 1)) 'interprets scancodes
- LOCATE row, lc% + 1, 0: COLOR fc%, bc%: PRINT opt$
- 'restores previous entry and color
- SELECT CASE keymove
- CASE 13
- IF row = row% THEN END
- IF row = row% + 1 THEN END 'this block of IF statements
- IF row = row% + 2 THEN END 'will redirect the menu to perform
- IF row = row% + 3 THEN END 'any user defined task within the
- IF row = row% + 4 THEN END 'user's program
- IF row = row% + 5 THEN END
- IF row = row% + 6 THEN END 'Edit out "END"
- IF row = row% + 7 THEN END
- IF row = row% + 8 THEN END
- IF row = row% + 9 THEN END
- CASE 72: row = row - 1 'moves widebar selector down 1 row
- CASE 80: row = row + 1 'moves widebar selector up 1 row
- CASE 71: row = row% + 9 'shortcut keys
- CASE 79: row = row% + 9 'shortcut keys
- END SELECT
- IF row < row% THEN row = row% + 9 ELSE IF row > row% + 9 THEN row = row%
- 'sets limits for widebar selector
- LOOP
- END
- END SUB
-
-